1. Field of the Invention
The present invention is directed to a microcontroller with a program status word that can be reconfigured to be compatible with a prior generation microcontroller and, as a result, allows multiple microcontroller modes to coexist and, more particularly, to a system with selection and routing circuitry for selecting and rearranging bits of the program status word responsive to the multiple modes of the microcontroller.
2. Description of the Related Art
Microcontrollers are being called upon to perform more and more complex tasks in less and less time. This has required microcontrollers to be redesigned to be more complex and faster. More complex microcontrollers have many more functions and operations that need to be monitored. As a result, the program status word (PSW) of the redesigned microcontrollers has gotten larger with a larger number of status bits. For example, when a microcontroller grows from an eight bit architecture to a sixteen bit architecture the PSW can grow to twelve or sixteen bits. Because of the architectural and layout considerations of the redesign process, as well as PSW size considerations, it is sometimes necessary to rearrange and relocate the status bits of a PSW as compared to the bit arrangement found in a previous generation of microcontroller. However, users of the prior generation of microcontrollers are reluctant to discard or rewrite software designed for the prior generation and prefer that succeeding generations of microcontrollers be capable of running the older software. This requires that the PSW of the newer generation of microcontrollers be compatible with prior generations.
As a result, what is needed is a microcontroller in which the PSW is compatible between generations even when the size and bit arrangement of the PSW has changed.